package com.fund.datacopy.web.dto;

import java.io.Serializable;

public class ResponseDto implements Serializable {
	private static final long serialVersionUID = 1L;
	private String code;
	private String msg;
	private Object result;

	public ResponseDto() {
	}

	public ResponseDto(String code, String msg, Object result) {
		this.code = code;
		this.msg = msg;
		this.result = result;
	}

	public static ResponseDto success(Object result) {
		return new ResponseDto(result);
	}

	public static ResponseDto failure(Object result) {
		return new ResponseDto("1", "失败", result);
	}

	public static ResponseDto success() {
		return success();
	}

	public ResponseDto(Object result) {
		this.code = "0";
		this.msg = "成功";
		this.result = result;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return this.msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getResult() {
		return this.result;
	}

	public void setResult(Object result) {
		this.result = result;
	}
}
